const awaitWrap = (promise) => {
  return promise
    .then(data => [null, data])
    .catch(err => [err, null])
}
export default {
  install(Vue) {
    Vue.prototype.$asy = awaitWrap
  }
}
